// pages/theme/theme.js
import {Theme} from 'theme-model';
var theme = new Theme();
Page({

    /**
     * 页面的初始数据
     */
    data: {
        loadingHidden:false
    },
    onReady:function(option){
        wx.setNavigationBarTitle({
            title: this.data.titleName
        });
    },
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
        this.data.titleName = options.name;
        this.data.id = options.id;
        this._onload();
    },
    _onload:function(){
        var that = this;
        console.log(this.data.id);
        theme.getProductorData(this.data.id,function (data) {
            console.log(data);
            that.setData({
                themeInfo:data,
                loadingHidden:true
            })
        })
    },
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {

    }
})